<template>
  <el-config-provider :locale="zhCn">
    <router-view/>
  </el-config-provider>
</template>

<script setup>
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
import {onMounted} from "vue";
import {ipc, isEE} from "@/utils/ipcRenderer";
import router from "@/router";

onMounted(() => {
  document.getElementById('loadingPage').remove()

  // 监听退出登录事件
  isEE && ipc.on('controller.global.quitLogin', () => {
    console.log('退出登录')
    router.replace({
      name: 'Login'
    })
    ipc.invoke('controller.global.quitLogin')
  })
})
</script>
<style lang="less"></style>
